import { OnInit, Component, ViewChild } from '@angular/core';
import { NotificationInformationListComponent } from './notification-information-list.component';

@Component({
  selector: 'app-notification-information-view',
  templateUrl: './notification-information-view.component.html',
  styles: [],
})
export class NotificationInformationViewComponent implements OnInit {
  constructor() {}

  @ViewChild('notificationInformationListComponent', { static: false })
  notificationInformationListComponent: NotificationInformationListComponent;

  /**
   * 条件查询参数
   */
  queryParams = {
    type: null,
    title: null,
    receiverName: null,
  };

  /**
   * 查找全局参数配置
   */
  onSearch() {
    this.notificationInformationListComponent.loadData();
  }

  /**
   * 重置表单
   */
  onResetForm() {
    this.queryParams.type = null;
    this.queryParams.title = null;
    this.queryParams.receiverName = null;
  }

  /**
   * 新建全局参数配置
   */
  create() {
    this.notificationInformationListComponent.create();
  }

  /**
   * 刷新
   */
  reflesh() {
    this.notificationInformationListComponent.loadData();
  }

  ngOnInit() {}
}
